package com.czk.springboot.reactive.stream;

import java.util.function.Predicate;

public class PredicateDemo {
    public static void main(String[] args) {

        Predicate<Integer> predicate = (x) -> x % 2 == 0;
        // 正向判断
        System.out.println(predicate.test(6));
        // 反向判断
        System.out.println(predicate.negate().test(2));


    }
}
